<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>dycalendar</title>
  <style>
    * {
      text-align: center;
    }

    .wrap {
      /* position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0; */
      background: #000 left center no-repeat;
      background-attachment: fixed;
      background-size: cover;
    }
  </style>
</head>

<body>
  <table>
    <thead></thead>
    <tbody></tbody>
  </table>
  <div class="wrap"></div>
  <input type="date" class="date" type="text" />
  <button class="date">
    测试
  </button>
</body>

<script src="/assets/js/utils/util.js"></script>
<script src="/assets/js/data/tools/getDayName.js"></script>
<script>
  let date = "2023-01-02";

  let table = document.querySelector("table");
  let thead = document.querySelector("thead");
  let tbody = document.querySelector("tbody");
  // let head = `一二三四五六日`.split("");

  let { content, head } = tools.dycalendar("2020-02", "all");

  let tr = document.createElement("tr");
  head.map((ele) => {
    let td = document.createElement("td");
    td.innerText = ele;
    tr.append(td);
  });
  thead.append(tr);

  content.map((el) => {
    let tr = document.createElement("tr");
    el.map((ele) => {
      let td = document.createElement("td");
      td.innerText = ele;
      tr.append(td);
    });
    tbody.append(tr);
  });
</script>
<script>
  let ipt = document.querySelector("input.date");
  let btn = document.querySelector("button.date");
  btn.addEventListener('click', function () {
    date = ipt.value;
    console.log([date, getLunar(date), getjq(date),getDayName(date)]);
  });
</script>

</html>